<div class="card-header  text-white" xmlns="http://www.w3.org/1999/html">
    <div class="input-group col-md-12 col-xl-6">
        <input type="text" class="form-control" id="searchName" placeholder="输入器材名称进行搜索">
        <span class="input-group-btn">
			<button class="btn btn-secondary" type="button" id="searchNameBtn" >
				<i class="fa fa-search" aria-hidden="true"></i>
			</button>
		</span>

    </div>
</div>

<div id="mainContainer" class="container" >
    <div id="mainContainerRepleace" class="row">
        <table class="table table-striped">
            <thead>
            <tr>
                <th data-field="equipmentScrappedId" >ID</th>
                <th data-field="equipmentName">器材名称</th>
                <th data-field="equipmentSpecifications">器材规格</th>
                <th data-field="equipmentCount">器材数量</th>
                <th data-field="equipmentPrice">单个价格</th>
                <th data-field="equipmentScrappedState">审核状态</th>
                <th data-field="operation">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="es : ${equipmentScraps}">
                <th th:text="${es.equipmentScrapId}">...</th>
                <td th:text="${es.equipmentInfo.equipmentName}">...</td>
                <td th:text="${es.equipmentInfo.equipmentSpecifications}">...</td>
                <td th:text="${es.equipmentCount}">...</td>
                <td th:text="${es.equipmentInfo.equipmentPrice}">...</td>
                <td>
                    <span class="text-secondary" th:if="${es.equipmentScrapState=='0'}">待审核</span>
                    <span class="text-success" th:if="${es.equipmentScrapState=='1'}">已通过</span>
                    <span class="text-danger" th:if="${es.equipmentScrapState=='2'}">已拒绝</span>

                </td>
                <td>
                    <button  class="btn btn-danger btn-sm" id="undo-equipmentScrapped" th:if="${es.equipmentScrapState=='0'}" data-th-attr="equipmentScrapId=${es.equipmentScrapId},teacherNumber=${es.teacherInfo.teacherNumber}">
                        <i class="fa fa-undo" aria-hidden="true">撤销</i>
                    </button>
                </td>
            </tr>
            </tbody>
        </table>
        <div th:replace="~{fragments/page :: page}">...</div>
    </div>
</div>

<script src="../../js/equipments/scrapped.js" th:src="@{/js/equipments/scrapped.js}"></script>
